package com.wanggan.rmi.service.impl;

import java.io.Serializable;
import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

import com.wanggan.rmi.service.HelloService;

/**
 * @author wanggan
 */

//@Service
public class HelloServiceImpl extends UnicastRemoteObject implements HelloService,Serializable {
    
    
    private static final long serialVersionUID = 6047475277892524226L;
    private String name;
    
    public HelloServiceImpl() throws RemoteException {
    }
    
    public HelloServiceImpl(String name) throws RemoteException {
        this.name = name;
    }
    
    @Override
    public String service(String data) throws RemoteException {
        return data+name;
    }
}
